package com.linkage.bookshop.repository;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import com.linkage.bookshop.model.Order;
import com.linkage.bookshop.model.Orderline;
@Repository
public interface OrderRepository {
	/*通过订单ID查出订单*/
	public Order selectOrderById(int id);
	/*通过用户ID查找订单*/
	public List<Order> selectOrderByUserId(int userId);
	/*通过订单状态查找订单*/
	public List<Order> selectOrderByStatus(int status);
	/*插入订单*/
	public void insertOrder(Order order);
	/*插入订单行*/
	public void insertOrderline(Orderline ol);
	/*修改订单状态*/
	public void updateOrder(Order order);
	/*修改财富*/
    public void modifyWealth(@Param("username")String username,@Param("wealth")double wealth);
	/*查找订单具体信息*/
    public List<Orderline> checkOrderline(int orderId);
    /*改变订单行状态*/
    public void changeCommentFlag(int orderlineId);
}
